@import 'ant-design-vue/dist/antd.less'; // 引入官方提供的 less 样式入口文件
// 全局提示
.ant-message {
  .anticon {
    font-size: 24px;
    margin-right: 14px;
    vertical-align: bottom;
  }
}
// 弹框
.ant-modal {
  .ant-modal-confirm-body {
    .ant-modal-confirm-content {
      color: rgba(0, 0, 0, 0.65);
    }
  }
  .ant-modal-confirm-btns {
    .ant-btn {
      padding: 4px 30px;
    }
  }
}
.modal-confirm-box {
  .ant-modal-confirm-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
  }
  .ant-modal-body {
    padding: 32px 16px 12px;
  }
}
//按钮
// .ant-btn {
//   border-color: #b6b6b6;
// }

.ant-btn,
.ant-btn-primary {
  text-shadow: none;
  box-shadow: none;
}
.ant-btn-primary {
  &:focus {
    border-color: @primary-color;
    background: @primary-color;
  }
}
.ant-btn[disabled],
.ant-btn[disabled]:hover,
.ant-btn[disabled]:focus,
.ant-btn[disabled]:active {
  color: #c0c4cc;
  background-color: #fff;
  border-color: #ebeef5;
}
body {
  .ant-input[disabled],
  .ant-input[disabled]:hover,
  .ant-input[disabled]:focus,
  .ant-input[disabled]:active {
    color: #555d6f;
    background-color: #fafafa;
    border-color: #cdcdcd;
  }
}

// .ant-btn-primary:hover,
// .ant-btn-primary:focus {
//   border-color: @primary-color;
//   background: @primary-color;
// }
.ant-btn-primary[disabled],
.ant-btn-primary[disabled]:hover,
.ant-btn-primary[disabled]:focus,
.ant-btn-primary[disabled]:active {
  color: #fff;
  border-color: #80e38e;
  background: #80e38e;
}
// 多选框
.ant-checkbox-indeterminate,
.ant-tree-checkbox-indeterminate {
  .ant-checkbox-inner,
  .ant-tree-checkbox-inner {
    border-color: @primary-color;
    background-color: @primary-color;
    &::after {
      width: 10px;
      height: 2px;
      background-color: #fff;
    }
  }
  &.ant-tree-checkbox-disabled {
    .ant-tree-checkbox-inner {
      background-color: #f5f5f5;
    }
  }
}
.ant-checkbox-input:focus + .ant-checkbox-inner {
  border-color: @border-color-base;
}
.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled),
.ant-radio-button-wrapper {
  &:focus-within {
    box-shadow: 0 0 0 2px #d6e3d5;
  }
}
// 空状态
.ant-table-empty {
  .ant-table-body {
    min-height: 500px;
    .ant-empty {
      min-height: 460px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      .ant-empty-image {
        height: 120px;
      }
    }
  }
}

.drawer-table-empty {
  .ant-table-empty {
    .ant-table-body {
      min-height: auto;
      .ant-empty {
        min-height: auto;
      }
    }
  }
}
.ant-empty-description {
  color: rgba(0, 0, 0, 0.25);
}

// 表格
.ant-table {
  .ant-table-container {
    font-size: 12px;
  }
}
.ant-table-tbody > tr.ant-table-row-selected > td {
  background: transparent;
}
.ant-table-tbody > tr.ant-table-row:hover > td,
.ant-table-tbody > tr > td.ant-table-cell-row-hover {
  background: @primary-color-light;
}
.ant-table .ant-table-thead > tr > th,
.ant-table .ant-table-container .ant-table-tbody > tr > td {
  padding: 12px;
  line-height: 23px;
}
.ant-btn.g-operate-btn {
  min-width: 24px;
  font-size: 12px;
  padding: 0;
  height: auto;
  border: none;
  & + & {
    margin-left: 24px;
  }
}

.ant-table-thead
  > tr
  > th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {
  visibility: hidden;
}

.ant-table-ping-left:not(.ant-table-has-fix-left) .ant-table-container::before,
.ant-table-ping-right:not(.ant-table-has-fix-right) .ant-table-container::after {
  box-shadow: none;
}
// 去除固定头部header滚动条占位
.ant-table-fixed-header {
  .ant-table-container {
    margin-right: -10px;
  }
  .ant-table-thead .ant-table-cell-scrollbar {
    display: none;
  }
}
// 树状tree
.ant-tree-list {
  .ant-tree-switcher-icon {
    color: #c0c4cc;
  }
  .ant-tree-treenode {
    padding: 4px 0;
    &:hover {
      background-color: @primary-color-light;
    }
  }
  .ant-tree-node-content-wrapper {
    &.ant-tree-node-selected {
      background-color: transparent;
      color: @primary-color;
    }
    &:hover {
      background-color: transparent;
    }
  }
}
.ant-select-tree {
  .ant-select-tree-switcher-icon {
    color: #c0c4cc;
  }
  .ant-select-tree-node-content-wrapper {
    &.ant-select-tree-node-selected {
      background-color: @primary-color-light;
    }
  }
}
// 分页器
.ant-pagination {
  color: #595959;
  .ant-pagination-item-active {
    background: @primary-color;
    border-color: @primary-color;
    a {
      color: #fff;
    }
  }
}
// .ant-table-pagination.ant-pagination {
//   margin-bottom: 0;
// }

// 表单
.ant-input-affix-wrapper {
  .ant-input-clear-icon,
  .ant-input-password-icon {
    display: none;
  }
}
.ant-input-affix-wrapper:hover {
  .ant-input-clear-icon,
  .ant-input-password-icon {
    display: block;
  }
}
.ant-form-item-label > label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before {
  color: @error-color;
}
// .ant-input-affix-wrapper:focus,
// .ant-input-affix-wrapper-focused {
//   box-shadow: none;
// }
// 下拉框滚动条
.rc-virtual-list-scrollbar-thumb,
.ant-select-tree-list-scrollbar-thumb {
  background: rgba(148, 153, 164, 0.3) !important;
}
.ant-dropdown-menu-item:hover,
.ant-dropdown-menu-submenu-title:hover {
  background: @primary-color-light;
}
.ant-select-item-option-active:not(.ant-select-item-option-disabled),
.ant-select-item-option-selected:not(.ant-select-item-option-disabled) {
  background: @primary-color-light;
  font-weight: normal;
}
// 级联框
.ant-cascader-menu-item-active:not(.ant-cascader-menu-item-disabled),
.ant-cascader-menu-item-active:not(.ant-cascader-menu-item-disabled):hover {
  background: @primary-color-light;
  font-weight: normal;
}
.custom-cascader-height {
  .ant-cascader-menu {
    max-height: 330px;
    height: auto;
  }
}
// 抽屉弹框
.basic-drawer {
  .ant-drawer-wrapper-body {
    overflow: hidden;
    .ant-drawer-header {
      width: 100%;
      height: 44px;
      padding: 0 14px;
      .ant-drawer-close {
        color: #535d71;
        order: 1;
        margin-right: 0;
        font-size: 18px;
      }
    }
  }
  .ant-drawer-close :hover {
    color: @primary-color;
  }
  .ant-drawer-body {
    height: calc(100% - 56px);
    padding: 0;
    background-color: #fff;
    .scrollbar__wrap {
      padding: 16px;
      margin-bottom: 0;
    }

    > .scrollbar > .scrollbar__bar.is-horizontal {
      display: none;
    }
  }
}
.basic-drawer.basic-drawer__abosult {
  position: absolute;
  .ant-drawer-mask {
    background: transparent;
  }
}
.basic-drawer.basic-drawer__detail {
  position: absolute;
  .ant-drawer-mask {
    background: transparent;
  }
  .ant-drawer-wrapper-body {
    .ant-drawer-header {
      width: 100%;
      height: 62px;
      padding: 0;
      border-top: 1px solid #f0f0f0;
      box-sizing: border-box;
    }
  }
  .ant-drawer-title {
    height: 100%;
  }
  .ant-drawer-close {
    height: 40px;
    line-height: 40px;
  }
  .scrollbar__wrap {
    padding: 0;
  }

  .ant-drawer-body {
    height: calc(100% - 40px);
  }
}

// 菜单栏
.ant-menu.ant-menu-light {
  .ant-menu-item-selected,
  .ant-menu-item:active {
    background-color: @primary-color-light;
  }
  .ant-menu-submenu-title:active {
    background-color: transparent;
  }
}
.ant-menu-submenu-popup {
  .ant-menu-vertical {
    .ant-menu-item:not(:last-child) {
      margin-bottom: 4px;
    }
  }
}
// tooltip 文字提示
.ant-tooltip {
  max-width: 460px;
}

.all-global-select {
  .ant-select-item {
    margin-bottom: 2px;
    padding-left: 16px;
    padding-right: 16px;
    &:last-child {
      margin-bottom: 0;
    }
    .ant-select-item-option-state {
      display: none;
    }
    .ant-select-item-option-content {
      display: flex;
      align-items: center;
      word-break: break-all;
      word-wrap: break-word;
      white-space: normal;
    }
    .select-check {
      width: 14px;
      height: 14px;
      background: #ffffff;
      border-radius: 2px;
      border: 1px solid #cdcdcd;
      margin-right: 8px;
      flex-shrink: 0;
      &:hover {
        border-color: @primary-color;
      }
    }
    &.ant-select-item-option-selected {
      .select-check {
        background-color: @primary-color;
        border-color: @primary-color;
        position: relative;
        &::after {
          content: ' ';
          position: absolute;
          width: 6px;
          height: 9px;
          top: 5px;
          left: 2px;
          border: 2px solid #fff;
          border-top: 0;
          border-left: 0;
          transform: rotate(45deg) scale(1) translate(-50%, -50%);
          opacity: 1;
          transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s;
        }
      }
    }
  }
}
